@extends('home.public.base')

@section('title', '分类')

@section('content')

    <div class="currentloc bg-f5f5f5 clear">
        <div class="center f12">
            <div class="fl"><a href="/">首页</a><span>/</span><a
                        href="/category/{{$category['id']}}">礼物分类</a><span>/</span>{{$category['name']}}
            </div>
            <a href="http://crm2.qq.com/page/portalpage/wpa.php?uin=779635593&cref=http://www.liwuyou.com/&ref=&f=1&ty=1&ap=&as="
               class="fr qqbtn tc f-666" target="_blank">QQ在线交谈</a>
        </div>
    </div>
    <div class="query-box query-box-list">
        <div class="center">
            <div class="clear">
                <div class="query fl rel">
                    <dl class="clear">
                        <dt class="fl p-l-20 p-y-20">分类&nbsp;:</dt>
                        <dd class="fl p-y-20">
                            <a href="/category/{{$category['id']}}"
                               @if($childcatewhere == '')
                               class="focus"
                                    @endif
                            >全部</a>
                            @foreach($childcates as $childcate)
                                <a href="/category/{{$category['id']}}?childcate={{$childcate['id']}}"
                                   @if($childcatewhere == $childcate['id'])
                                   class="focus"
                                        @endif
                                >{{$childcate['name']}}</a>
                            @endforeach
                        </dd>
                    </dl>
                </div>

            </div>
        </div>
    </div>


    {{--礼物列表--}}
    <div class="cat-box">
        <div class="center">
            @if(count($goods) == 0)
                过几天再来吧
            @endif

            <ul class="cat-list clear">
                @foreach($goods as $good)
                    <li class="fl p-30 m-t-20 ani-bd-shadow rel m-l-5 ">
                        <a href="/goods/{{$good['id']}}" target="_blank" class="img-link">
                            <img src="/{{$good['list_img']}}" class="normalpic focus"/></a>
                        <p class="overtxt m-t-20 cat-name">
                            <a href="goods.php?id=3478" target="_blank"
                               title="{{$good['title']}}">{{$good['title']}}</a>
                        </p>
                        <p>￥{{$good['shop_price']}}</p>
                    </li>
                @endforeach
            </ul>
            <style>
                .pages {
                    padding: 10px;
                }

                .pages ul li {
                    float: left;
                    color: dodgerblue;
                    border: 1px dodgerblue solid;
                    border-radius: 5px;
                    margin-left: 5px;
                }

                .pages .pagination li {
                    width: 65px;
                    height: 35px;
                    text-align: center;
                    line-height: 35px;
                }
            </style>
            <div class="pages tc p-y-40">
                {{ $goods->links() }}
            </div>
        </div>

    </div>


@endsection